package cn.kgc.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

/**
 * @author wangyue
 * @version 1.0
 * 登录或者注册的表单
 */
@Data
@ApiModel(description = "一键登录注册的表单")
public class LoginOrRegisterForm {
    @ApiModelProperty(name = "mobile",value="手机号")
    @Pattern(regexp = "^1\\d{10}$",message = "手机号格式错误")
    private String mobile;

    @ApiModelProperty(name="smsCode",value = "验证码")
    @Pattern(regexp = "^\\d{6}$",message = "验证码必须是6位")
    private String smsCode;
}